/*
 * this header file defines the class Violation
 */
#ifndef __CCCC_MOD_VIO_H
#define __CCCC_MOD_VIO_H

#include <string>
#include <vector>
using namespace std;

class AViolation
{
private:
	string description;
	int line;
	string file;
	int viotype;
	static const int FILE_VIO = 1;
	static const int MOUDLE_VIO = 2;
public:
	AViolation(string des, string file, int line, int viotype);
	AViolation(string s)
	{
		description = "";
		file = "";
		viotype = 1;
		line = 1;
	}
	~AViolation();
	void setDescription(string description);
	string getDescription();
	void setLine(int line);
	int getLine();
	string getFile();
	void setFile(string file);
	string toString();
	int getViotype() const
	{
		return viotype;
	}

	void setViotype(int viotype)
	{
		this->viotype = viotype;
	}

};

class Violation
{
private:
	vector<AViolation *> * violations;

public:
	Violation();
	~Violation();

	void addViolation(AViolation * violation);
	vector<AViolation *> * getViolations();
	AViolation * getViolationAt(int idx);
	void printViolation();
};

#endif
